Skip to content

Return configuration changes to caller#21

Merged
ChristineWanjau merged 29 commits intomainfrom
cwanjau/exposeConfigurationDiff
Jan 8, 2026
Merged

Return configuration changes to caller#21
ChristineWanjau merged 29 commits intomainfrom
cwanjau/exposeConfigurationDiff

Conversation

@ChristineWanjau
Copy link
Contributor

@ChristineWanjau ChristineWanjau commented Oct 30, 2025

This change removes the concept of dry-run from the JSImporter and introduces a new approach for exposing configuration changes. Instead of handling the printing of diffs internally, the importer now simply returns the configuration diff, leaving it to the caller to decide how to use it (e.g., print to console or process further).

The previous design tightly coupled the importer with output behavior (printing diffs), which limited flexibility. By returning the diff directly, portal, pipeline tasks or other external callers can decide on how to use the diff.

@ChristineWanjau ChristineWanjau marked this pull request as draft October 30, 2025 13:30
@ChristineWanjau ChristineWanjau marked this pull request as ready for review November 3, 2025 06:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the import logic to distinguish between added, modified, and deleted configuration settings, and introduces a new ConfigurationDiff interface that is returned when the dryRun parameter is enabled.

Key changes:

  • Introduces ConfigurationDiff interface with Added, Modified, and Deleted arrays
  • Refactors import logic into analyzeConfigurationChanges method to separate analysis from execution
  • Modified settings are now tracked separately from additions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
libraries/azure-app-configuration-importer/src/models.ts Adds ConfigurationDiff interface and imports required types from @azure/app-configuration
libraries/azure-app-configuration-importer/src/index.ts Exports the new ConfigurationDiff interface
libraries/azure-app-configuration-importer/src/appConfigurationImporter.ts Refactors import logic to distinguish between added/modified/deleted settings and returns ConfigurationDiff when dryRun=true

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ChristineWanjau ChristineWanjau changed the title Return configuration diff when dry-run is true Return configuration changes to caller Nov 7, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ChristineWanjau ChristineWanjau merged commit 427e075 into main Jan 8, 2026
2 checks passed
@ChristineWanjau ChristineWanjau deleted the cwanjau/exposeConfigurationDiff branch January 8, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants